package com.marvels.financial.pay.bfpay.service;

import java.util.List;
import java.util.Map;

import com.marvels.common.exception.MarvelsBusinessException;
import com.marvels.financial.pay.bfpay.dto.*;
import com.marvels.financial.pay.dto.PayResultDto;


/**
 * 宝付支付
 * @author 唐佩文
 *
 */
public interface BfPayApi {

	//-----------------------------------协议绑卡部分-----------------------------------------------------------------
	/**
	 * 宝付预绑卡
	 * @param bindCardDTO
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public  Map<String, Object>  baoFuPrebindCard(BaoFuPrebindCardDTO bindCardDTO)  throws MarvelsBusinessException;


	/**
	 * 宝付绑卡
	 * @param bindCardDTO
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public  Map<String, Object>   baoFuBindCard(BaoFuBindCardDTO bindCardDTO)  throws MarvelsBusinessException;


	//协议支付部分


	/**
	 * 宝付代付接口
	 * @param baoFuPayTradeDTO
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public PayResultDto baoFuPayTrade(BaoFuPayTradeDTO baoFuPayTradeDTO) throws MarvelsBusinessException;


	/**
	 * 宝付代付接口状态查询
	 * @param tradeStrtusQueryDTO
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public Map<String, Object> baoFuPayTradeStrtusQuery(BaoFuPayTradeStrtusQueryDTO tradeStrtusQueryDTO)  throws MarvelsBusinessException;



	/**
	 * 宝付协议支付类交易(代扣)
	 * @param baoFuDirectPaymentDTO
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public  Map<String, Object>  baoFuDirectPayment(BaoFuDirectPaymentDTO baoFuDirectPaymentDTO)  throws MarvelsBusinessException ;
	/**
	 *宝付转账支付交易
	 */
	public  Map<String, Object>  baoFuTransPayment(BaoFuDirectPaymentDTO baoFuDirectPaymentDTO)  throws MarvelsBusinessException ;

	// 查询时间段内未匹配的转账流水
	public List<BankTransactionDto> baoFuDirectPaymentStatementsTimeTask();

	/**
	 * 宝付直接支付类交易结果查询(代扣)
	 * @param map
	 * @return
	 */
	public  Map<String, Object>  baoFuDirectPaymentQuery(BaoFuDirectPaymentQueryDTO directPaymentQueryDTO)  throws MarvelsBusinessException;

	/**
	 * 宝付转账支付查询
	 */
	public Map<String, Object> baoFuTransPaymentQuery(BaoFuDirectPaymentQueryDTO directPaymentQueryDTO) throws MarvelsBusinessException;








	//四要素代扣

	/**
	 * 代扣类交易
	 * @param withHoldTradeDTO
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public  Map<String, Object>  withHoldTrade(WithHoldTradeDTO withHoldTradeDTO)  throws MarvelsBusinessException;




	/**
	 * 交易状态查询(宝付)
	 * @param jsonObject
	 * @return
	 */
	public Map<String, Object> tradeStatusQuery(Map<String, String> map) throws MarvelsBusinessException;


	//-----------------------------------宝付协议代扣回调通知-------------------------------------
	/**
	 * 宝付协议代扣异步通知
	 * @param paymentNotifyDTO
	 * @throws MarvelsBusinessException
	 */
	public void bfPaymentNotify(BfPaymentNotifyDTO paymentNotifyDTO)  throws MarvelsBusinessException;

	/**
	 * 宝付代付异步回调
	 * @param returnData
	 * @throws MarvelsBusinessException
	 */
	public void bfPaymentCallBack(BfPaymentCallBackDTO bBfPaymentCallBackDTO)   throws MarvelsBusinessException;
}
